<h1>Listing todos</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Body</th>
    <th>Done</th>
    <th>Due</th>
  </tr>

<% for todo in @todos %>
  <tr>
    <td><%=h todo.title %></td>
    <td><%=h todo.body %></td>
    <td><%=h todo.done %></td>
    <td><%=h todo.due %></td>
    <td><%= link_to 'Show', todo %></td>
    <td><%= link_to 'Edit', edit_todo_path(todo) %></td>
    <td><%= link_to 'Destroy', todo, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New todo', new_todo_path %>
